﻿export default [
  {
    path: '/',
    component: '../layouts/BlankLayout',
    routes: [
      {
        path: '/user',
        component: '../layouts/UserLayout',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './User/login',
          },
        ],
      },
      {
        path: '/',
        component: '../layouts/SecurityLayout',
        routes: [
          {
            path: '/',
            component: '../layouts/BasicLayout',
            authority: ['admin', 'user'],
            routes: [
              {
                path: '/',
                redirect: '/welcome',
              },
              {
                path: '/welcome',
                name: 'welcome',
                icon: 'smile',
                component: './Welcome',
              },
              {
                path: '/account',
                name: 'account',
                icon: 'icon-businessman',
                routes: [
                  {
                    path: '/account/center',
                    name: 'center',
                    component: './account/center',
                  },
                ],
              },
              {
                path: '/opmanager',
                name: 'opmanager',
                icon: 'icon-conference_call',
                routes: [
                  {
                    path: '/opmanager/members',
                    name: 'members',
                    component: './opmanager/members',
                  },
                  {
                    path: '/opmanager/content',
                    name: 'content',
                    component: './opmanager/content',
                  },
                ],
              },
              {
                path: '/saleorder',
                name: 'saleorder',
                icon: 'icon-briefcase',
                authority: ['admin'],
                routes: [
                  {
                    path: '/saleorder/orderEntry',
                    name: 'orderEntry',
                    component: './saleorder/orderEntry',
                  },
                  {
                    path: '/saleorder/quotation',
                    name: 'quotation',
                    component: './saleorder/quotation',
                  },
                  {
                    path: '/part/shipEntry',
                    name: 'shipEntry',
                    component: './part/shipEntry',
                  },
                  {
                    path: '/saleorder/customer',
                    name: 'customer',
                    component: './saleorder/customer',
                  },
                ],
              },
              {
                path: '/part',
                name: 'part',
                icon: 'icon-library',
                authority: ['admin'],
                routes: [
                  {
                    path: '/part/partEntry',
                    name: 'partEntry',
                    component: './part/partEntry',
                  },
                  {
                    path: '/part/warehse',
                    name: 'warehse',
                    component: './part/warehse',
                  },
                  {
                    path: '/part/InvADJ',
                    name: 'InvADJ',
                    component: './part/InvADJ',
                  },
                  {
                    path: '/part/InvCheck',
                    name: 'InvCheck',
                    component: './part/InvCheck',
                  },
                  {
                    path: '/part/shipEntry',
                    name: 'shipEntry',
                    component: './part/shipEntry',
                  },
                  {
                    path: '/part/rcvEntry',
                    name: 'rcvEntry',
                    component: './part/rcvEntry',
                  },
                  {
                    path: '/part/IssueMtl',
                    name: 'IssueMtl',
                    component: './part/IssueMtl',
                  },
                ],
              },
              {
                path: '/purchase',
                name: 'purchase',
                icon: 'icon-paid',
                authority: ['admin'],
                routes: [
                  {
                    path: '/purchase/poDemand',
                    name: 'poDemand',
                    component: './purchase/poDemand',
                  },
                  {
                    path: '/purchase/poSugg',
                    name: 'poSugg',
                    component: './purchase/poSugg',
                  },
                  {
                    path: '/purchase/poEntry',
                    name: 'poEntry',
                    component: './purchase/poEntry',
                  },
                  {
                    path: '/purchase/vendor',
                    name: 'vendor',
                    component: './purchase/vendor',
                  },
                  {
                    path: '/purchase/vendorPrice',
                    name: 'vendorPrice',
                    component: './purchase/vendorPrice',
                  },
                  {
                    path: '/purchase/poApprv',
                    name: 'poApprv',
                    component: './purchase/poApprv',
                  },
                ],
              },
              {
                path: '/manufacture',
                name: 'manufacture',
                icon: 'icon-services',
                authority: ['admin'],
                routes: [
                  {
                    path: '/manufacture/jobEntry',
                    name: 'jobEntry',
                    component: './manufacture/jobEntry',
                  },
                  {
                    path: '/manufacture/jobClose',
                    name: 'jobClose',
                    component: './manufacture/jobClose',
                  },
                  {
                    path: '/manufacture/resourceGroup',
                    name: 'resourceGroup',
                    component: './manufacture/resourceGroup',
                  },
                  {
                    path: '/manufacture/opMaster',
                    name: 'opMaster',
                    component: './manufacture/opMaster',
                  },
                  {
                    path: '/manufacture/bomDesign',
                    name: 'bomDesign',
                    component: './manufacture/bomDesign',
                  },
                  {
                    path: '/manufacture/mfgPlan',
                    name: 'mfgPlan',
                    component: './manufacture/mfgPlan',
                  },
                  {
                    path: '/manufacture/mfgMtl',
                    name: 'mfgMtl',
                    component: './manufacture/mfgMtl',
                  },
                  {
                    path: '/manufacture/mfgLabor',
                    name: 'mfgLabor',
                    component: './manufacture/mfgLabor',
                  },
                  {
                    path: '/manufacture/MRP',
                    name: 'MRP',
                    component: './manufacture/MRP',
                  },
                ],
              },
              {
                path: '/Inspect',
                name: 'Inspect',
                icon: 'icon-todo_list',
                authority: ['admin'],
                routes: [
                  {
                    path: '/Inspect/inspEntry',
                    name: 'inspEntry',
                    component: './Inspect/inspEntry',
                  },
                  {
                    path: '/Inspect/dmrEntry',
                    name: 'dmrEntry',
                    component: './Inspect/dmrEntry',
                  },
                ],
              },
              {
                path: '/Finance',
                name: 'Finance',
                icon: 'icon-money_transfer',
                authority: ['admin'],
                routes: [
                  {
                    path: '/Finance/FinRcvPay',
                    name: 'FinRcvPay',
                    component: './Finance/FinRcvPay',
                  },
                  {
                    path: '/Finance/Transaction',
                    name: 'Transaction',
                    component: './Finance/Transaction',
                  },
                ],
              },
              {
                path: '/admin',
                name: 'admin',
                icon: 'icon-settings',
                routes: [
                  {
                    path: '/admin/department',
                    name: 'department',
                    component: './admin/department',
                  },
                  {
                    path: '/admin/roles',
                    name: 'roles',
                    component: './admin/roles',
                  },
                  {
                    path: '/admin/tenants',
                    name: 'tenants',
                    component: './admin/tenants',
                    authority: ['GM'],
                  },
                  {
                    path: '/admin/sysconfig',
                    name: 'sysconfig',
                    component: './admin/sysconfig',
                  },
                  {
                    path: '/admin/files',
                    name: 'files',
                    component: './admin/files',
                  },
                  {
                    path: '/admin/setting',
                    name: 'setting',
                    component: './account/setting',
                  },
                ],
              },
              {
                component: './404',
              },
            ],
          },
          {
            component: './404',
          },
        ],
      },
    ],
  },
  {
    component: './404',
  },
];
